<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/warehouse/warehouse/Ware_OutSPWarehouse.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/warehouse/warehouse/Ware_OutSPWarehouse.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'OutStampingWarehouseID',
                footer: "Foots",
                cnName: '半成品出库明细',
                name: 'warehouse/Ware_OutSPWarehouse',
                url: "/Ware_OutSPWarehouse/",
                sortName: "OutStampingWarehouseID"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"OrderNum":"","WoCode":"","ProductName":"","ProductCode":"","State":""});
            const searchFormOptions = ref([[{"title":"订单号","field":"OrderNum","type":"text"},{"title":"工单号","field":"WoCode","type":"text"}],[{"title":"产品名称","field":"ProductName","type":"text"},{"title":"产品编码","field":"ProductCode","type":"text"}],[{"dataKey":"inStoreState","data":[],"title":"状态","field":"State","type":"select"}]]);
            const columns = ref([{field:'OrderNum',title:'订单号',type:'string',width:220,align:'left',sort:true},
                       {field:'WoCode',title:'工单号',type:'string',width:220,align:'left'},
                       {field:'OutStampingWarehouseID',title:'冲压料ID',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Client',title:'客户',type:'string',width:220,align:'left'},
                       {field:'ProductName',title:'产品名称',type:'string',width:220,align:'left'},
                       {field:'ProductCode',title:'产品编码',type:'string',width:220,align:'left'},
                       {field:'Specification',title:'规格',type:'string',width:220,align:'left'},
                       {field:'Type',title:'类别',type:'string',width:220,align:'left'},
                       {field:'Qnty',title:'库存数量',type:'decimal',width:110,align:'left'},
                       {field:'OutQnty',title:'已出库数量',type:'decimal',width:110,align:'left'},
                       {field:'State',title:'状态',type:'int',bind:{ key:'inStoreState',data:[]},width:80,align:'left'},
                       {field:'AddTime',title:'添加时间',type:'datetime',width:110,require:true,align:'left',sort:true},
                       {field:'CreateDate',title:'新建时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'CreateID',title:'新建人ID',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'新建人名称',type:'string',width:130,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人ID',type:'int',width:80,hidden:true,align:'left'},
                       {field:'LotNo',title:'批次',type:'string',width:220,align:'left'},
                       {field:'IType',title:'物料类别',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
